package com.yonyou.pmclouds.projectpart.mapper;

import com.yonyou.pmclouds.basecom.dao.BaseMapper;
import com.yonyou.pmclouds.projectpart.entity.ProjectPartRefVO;
import com.yonyou.pmclouds.projectpart.entity.ProjectPartVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ProjectpartMapper extends BaseMapper<ProjectPartVO> {

    List<ProjectPartVO> queryVOsByCondition(ProjectPartVO para);

    //查询项目指定层级的最大内码值
    String queryProjectMaxInnerCode(ProjectPartVO para);

    /**
     * 查询项目下 能被参照的工程部位集合
     *
     * @param pkProject
     * @return
     */
    List<ProjectPartRefVO> queryRefVOs(@Param("pkProject") String pkProject);

    @Select("select *  from pmbd_projectpart where pk_projectpart in (${pks}) ")
    @ResultType(ProjectPartVO.class)
    List<ProjectPartVO> getByIdsWithoutDr(@Param("pks") String pks);
}
